package org.example.sdpback.sdk.response;

import lombok.Getter;

/**
 * @ProjectName: sdp-back
 * @Package: org.example.sdpback.sdk.response
 * @ClassName: ResponseCode
 * @Author: zhuxingyue
 * @Description: 响应code码
 * @Date: 2024/10/31 17:28
 * @Version: 1.0
 **/

@Getter
public enum ResponseCode {
    Success(200, "请求成功"),
    Fail(400, "请求失败"),
    Unauthorized(401, "未授权"),
    Forbidden(403, "禁止访问"),
    NotFound(404, "未找到"),
    MethodNotAllowed(405, "不允许的方法"),
    InternalServerError(500, "服务器内部错误"),
    BadRequest(400, "请求参数错误"),
    UnsupportedMediaType(415, "不支持的媒体类型"),
    ServiceUnavailable(503, "服务不可用"),
    GatewayTimeout(504, "网关超时"),
    ;

    private int code;
    private String message;

    ResponseCode(int code, String message){
        this.code = code;
        this.message = message;
    }
}
